<?php
class HotJob extends CWidget {

    public function init() {
		parent::init();
		
	}
	
    public function HotJob() {
			
		$post = new Job();
			
		$criteria = new CDbCriteria(array(
                        'condition'=>'status=:status',
                        'params'=>array(':status'=>1),
                ));
				
		$criteria2 = new CDbCriteria(array(
                        'condition'=>'budget_id=:budget_id',
                        'params'=>array(':budget_id'=>14),
                ));
				
		$criteria->mergeWith($criteria2);
		
		$model = Job::model()->findAll($criteria);
		
        $this->render('hotJob', array(
			'post'=>$post,
			'model'=>$model,
        ));
    }
}
?>